import request from '@/utils/request'
// 获取部门信息
export function getdepartment() {
  return request({
    url: '/company/department'
  })
}

// 删除部门
export function deldepartment(id) {
  return request({
    url: '/company/department/' + id,
    method: 'delete'
  })
}
// 添加部门
export function addDepartment(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}

// 获取详情

export function getDeptDetailById(id) {
  return request({
    url: '/company/department/' + id
  })
}
// 编辑部门
export function updateDepartments(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
